import Vue from 'vue';
import App from './App';
import router from './router';
import store from '@/store';
import mixin from './mixin';

import MintUI from 'mint-ui';
import 'mint-ui/lib/style.css';

// http://mint-ui.github.io/#!/zh-cn
Vue.use(MintUI);
import { Toast, Indicator, MessageBox } from 'mint-ui';
Vue.prototype.$Toast = Toast;
Vue.prototype.$Loading = Indicator;
Vue.prototype.$MessageBox = MessageBox;
/**
 * this.$loading.open();
 * this.$loading.open('加载中');
 * this.$loading.open({
 *      text: '加载中...',
 * });
 * **/


// 使用echarts组件
// import echarts from 'echarts';
// Vue.prototype.$echarts = echarts;
Vue.mixin(mixin);
require('../static/plugin/fastclick'); // get fastclick
// 注册 fastclick
document.addEventListener('DOMContentLoaded', function () {
    if (window.FastClick) window.FastClick.attach(document.body);
}, false);

// Vue.use(VCharts);

new Vue({
    el: '#app',
    store,
    router,
    components: {App},
    template: '<App/>',
    created () {
    }
});
